<%@ page import="java.util.Vector" %>
<%@ page import="java.util.StringTokenizer" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
    <title>使用application内置对象--showMessage.jsp</title>
    <style>
        body {
            background: RGBA(38,38,38,1);
        }
        div{
            width: 800px;//
            border: 1px solid RGBA(100,90,87,1);
            color: white;
        }
        span{
            font-size: 20px;
            font-weight: bold;
        }
        .span0 {
            color: red;
            font-size: 25px;
        }
            .span1 {
                color: green;
            }
            .span2 {
                color: orange;
            }
            .span3 {
                color: green;
            }
            .span4 {
                color: red;
            }
    </style>
</head>
<body>
<div>
    <%
        Object o = application.getAttribute("message");
        if (o == null){
            out.print("暂时还没有留言呢");
        } else {
            Vector<String> v =(Vector<String>) o;
            for (int i =v.size() - 1; i>=0; i++){
                //注意必须用/. String[]st1 =v.get(i).split("/.");
                //           for(int j=0; j< st1.length;j++){
                //              out.print(st1[j] + "<br>");
                //            }
                //            out.print("<br>");

                StringTokenizer st =new StringTokenizer(v.get(i),".");
                while (st.hasMoreElements()){
                    out.print(st.nextToken() + "<br>");
                }
            }
        }
    %>
</div>
</body>
</html>